/**
 * Copyright (C), 2012-2018, 联奕科技有限公司
 * FileName: User
 * Author:   石贵武
 * Date:     2018\3\6 0006 16:53
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.zhoudongxiu.dto;

import com.fasterxml.jackson.annotation.JsonView;
import com.zhoudongxiu.constraint.MyConstraint;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Past;
import java.util.Date;

/**
 * 〈一句话功能简述〉<br>
 * 〈〉
 *
 * @author 石贵武
 * @create 2018\3\6 0006
 * @since 1.0.0
 */
//@Data
public class User {

    public interface UserSimplView {

    }

    public interface UserDetailView extends UserSimplView {

    }

    @MyConstraint(message = "这是一个测试，石贵武")
    private String username;

    @NotBlank(message = "密码不能为空！！")
    @ApiModelProperty(value = "用户密码")
    private String password;

    private String id;

    @Past(message = "生日时间必须为过去时间！！")
    private Date brithday;

    @JsonView(UserSimplView.class)
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @JsonView(UserDetailView.class)
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getBrithday() {
        return brithday;
    }

    public void setBrithday(Date brithday) {
        this.brithday = brithday;
    }
}

